﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Shared
{
    [ServiceContract]
    public interface ICRMRobotWCF
    {
        [OperationContract]
        MobinContact[] GetRegistrationContacts();

        [OperationContract]
        ActivationInfo[] GetActivationUsernames();

        [OperationContract]
        void UsernameActivationReport(int OrderId, string username, bool success, string report);

        [OperationContract]
        void ContactRegistrationReport(int OrderId, string username, bool success, string reportMessage);

        [OperationContract]
        MobinContact[] GetRegistrationContactsMock();
    }


    [DataContract]
    public class ActivationInfo
    {
        [DataMember]
        public String Username { get; set; }

        [DataMember]
        public int OrderId { get; set; }

        [DataMember]
        public int OrderStateId { get; set; }
    }

    [DataContract]
    public class MobinContact
    {
        [DataMember]
        public int OrderId { get; set; }

        [DataMember]
        public String Username { get; set; }

        [DataMember]
        public int RequestType { get; set; }

        [DataMember]
        public String ProductTitle { get; set; } // +

        [DataMember]
        public int ServiceDuration { get; set; }

        #region Personal Data

        [DataMember]
        public String PersonalFirstName { get; set; }

        [DataMember]
        public String PersonalLastName { get; set; }

        [DataMember]
        public String PersonalEnglishFullName { get; set; } // + Added in Contact Table

        [DataMember]
        public String IdentityNumber { get; set; }

        [DataMember]
        public String NationalCode { get; set; }

        [DataMember]
        public DateTime Birthday { get; set; }

        [DataMember]
        public String IdentityIssuePlace { get; set; } // + Added in Personal Contacts

        [DataMember]
        public String FatherName { get; set; }

        [DataMember]
        public String Job { get; set; } // + Added in Personal Contacts

        [DataMember]
        public String EducationalMajor { get; set; } // + Added in Personal Contacts

        /// <summary>
        /// Service.IsCertificateRequired
        /// </summary>
        [DataMember]
        public bool HighSpeed { get; set; }

        [DataMember]
        public int AcademicDegree { get; set; } // + Added in Personal Contacts

        #endregion

        #region Company Data

        [DataMember]
        public int ManagerAcademicDegree { get; set; } // + Added in Company Contact Table

        [DataMember]
        public String CompanyName { get; set; }

        [DataMember]
        public String CompanyEnglishName { get; set; } // + Added in Contact Table

        [DataMember]
        public String RegistrationNumber { get; set; }

        [DataMember]
        public String Economics { get; set; } // + 

        [DataMember]
        public String ManagerFirstName { get; set; } // + Added in Company Contacts

        [DataMember]
        public String ManagerLastName { get; set; } // + Added in Company Contacts

        [DataMember]
        public String ManagerEnglishFullName { get; set; } // + Added in Company Contacts

        [DataMember]
        public String ManagerNationalCode { get; set; } // + Added in Company Contacts

        [DataMember]
        public DateTime ManagerBirthday { get; set; } // + Added in Company Contacts

        [DataMember]
        public String ManagerEducationalMajor { get; set; } // + Added in Company Contacts

        [DataMember]
        public String CompanyActivityField { get; set; } // + Added in Company Contacts

        #endregion

        #region Contact

        [DataMember]
        public String Tel { get; set; }

        [DataMember]
        public String Mobile { get; set; }

        [DataMember]
        public String Fax { get; set; } // + Added to Contacts Table

        [DataMember]
        public String Email { get; set; } // + Added to Contacts Table

        [DataMember]
        public String WebSite { get; set; } // + Added to Contacts Table

        [DataMember]
        public int ProvinceId { get; set; }

        [DataMember]
        public int CityId { get; set; }

        [DataMember]
        public String Address { get; set; }

        [DataMember]
        public String ZipCode { get; set; }

        #endregion

        #region Service and InstallationInfo

        [DataMember]
        public int InstallationProvinceId { get; set; }

        [DataMember]
        public int InstallationCityId { get; set; }

        [DataMember]
        public String InstallationRegion { get; set; } // +

        [DataMember]
        public String InstallationAddress { get; set; } // +

        [DataMember]
        public String InstallationPlaque { get; set; } // +

        [DataMember]
        public String InstallationBuildingName { get; set; } // +

        [DataMember]
        public String InstallationFloor { get; set; } // +

        [DataMember]
        public String InstallationVahed { get; set; } // +

        #endregion
    }

    /*
     * 
     * * //Address
            Address = "بزرگراه صدر",
            PostalCode = "19319",
            Tel = "22214214",
            Mobile = "09194925249",
            Fax = "222",
            Email = "babak@gmail.com",
            Webiste = "babak.com",
            Region = 25,
            City = 2,
            //Place
            AddressModem = "شمالی",
            Plaque = "10",
            BuilidingName = "کاوه",
            PlaceFloor = "2",
            PlaceVahedNum = "5",
            PlaceTelNum = "22205934",
            PlaceOstan = 0,
            PlaceCity = 128,
            //Product
            ProductTitle = "51_1390/04/05",
            ServiceDuration = 6,
     * 
    private static Register SampleData = new Register()
        {
            Identity = "2000020015237",
            RequestType = 1,
            // Personal
            PersonalName = "بابک",
            PersonalLastName = "قضوهی",
            PersonalFullName = "Babak Ghazvehi",
            ActualId = "1111",
            MelliCode = "007",
            BirthDate = "1388/03/22",
            ActualIssue = "تهران",
            FatherName = "محمد ابراهیم",
            ActualEmploy = "همه کاره",
            ActualMajor = "ریاضی",
            ActualHighSpeed = true,
            ActualMadarek = 2,
            
     * // Company
     *      ManagerGrade = 1,
            CompanyName = "نوین",
            CompanyFullName = "Novin Chi",
            RegNo = "13",
            Economics = "چی چی",
            ManagerName = "اکبر",
            ManagerLastName = "حسینی",
            ManagerMelliCode = "700",
            ManagerBirthDate = "1310/12/15",
            CompanyManagerGrade = 4,
            ManagerMajor = "دیپلم", 
            CompanyBaseActivity = "کلاهبرداری",
            ManagerFullname = "Akbar Hosseini",
       
     
        };
     * 
     */
}
